IF OBJECT_ID('ssf.dpnd_get_object_comment') IS NOT NULL
	DROP FUNCTION ssf.dpnd_get_object_comment
GO

CREATE FUNCTION ssf.dpnd_get_object_comment (
	@dpnd_object_name NVARCHAR(256)
)
RETURNS TABLE
AS
	RETURN (
		SELECT object_comment_id
			, header_object_id
			, comment_sequence
			, code_comment
		FROM ssf.dpnd_object_comment WITH (NOLOCK)
		WHERE header_object_id = ssf.dpnd_get_header_object_id(@dpnd_object_name)
	)
GO
